<!--
 * @Author: yaojian66 1327629137@qq.com
 * @Date: 2022-06-23 15:04:26
 * @LastEditors: yaojian66 1327629137@qq.com
 * @LastEditTime: 2022-06-23 15:19:03
 * @FilePath: \geyao\第十八题 浮动和清除浮动.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动和清除浮动</title>
  <style type="text/css">
    .wrap {
      height: 100px;
      /*补全代码*/
      clear: both;

    }

    .left {
      width: 100px;
      height: 100px;
      float: left;
      /*补全代码*/

    }

    .right {
      width: 100px;
      height: 100px;
      float: left;
      /*补全代码*/

    }
  </style>
</head>

<body>
  <!-- 请将类为"left"的div元素和类为"right"的div元素在同一行上向左浮动，且清除类为"wrap"的父级div元素内部的浮动。 -->
  <div class='wrap'>
    <div class='left'></div>
    <div class='right'></div>
  </div>
</body>

</html>